//----------------------------------------------------------------------------------
// CRenderableObjectsManager class
// Author: 
//
// Description:
// Gestor de mallas (CStaicMesh)
//----------------------------------------------------------------------------------

#pragma once
#ifndef RENDERABLE_OBJECT_MANAGER_H
#define RENDERABLE_OBJECT_MANAGER_H

#include "RenderableObject.h"
#include "Utils\MapManager.h"
#include <vector>
#include "Math\MathTypes.h"

class CRenderManager;


class CRenderableObjectsManager : CMapManager<CRenderableObject>
{
private:
	std::vector<CRenderableObject *> m_RenderableObjects;
public:
	CRenderableObjectsManager();
	~CRenderableObjectsManager();
	void					Update						(float ElapsedTime);
	void					Render						(CRenderManager *RM);
	CRenderableObject *		AddMeshInstance				(const std::string &CoreMeshName, const	std::string &InstanceName, const Vect3f &Position);
	CRenderableObject *		AddAnimatedInstanceModel	(const std::string &CoreModelName,	const std::string &InstanceModelName, const Vect3f &Position);
	void					AddResource					(const std::string &Name, CRenderableObject *RenderableObject);
	void					CleanUp						();
	void					Load						(const std::string &FileName);
	CRenderableObject *		GetInstance					(const std::string &Name) const;
};

#endif //RENDERABLE_OBJECT_MANAGER_H